$(function(){
	$("#saveSetting").click(function(){
		this.disabled="disabled";
		var $roleName = $("[name='roleName']");
		if(isEmpty($roleName.val())){
			layer.tips("角色名称不能空",$roleName.get(0));
			$roleName.focus();
			this.disabled="";
			return false;
		}
		/*
		var $roleOrder=$("[name='roleOrder']");
		if(isEmpty($roleOrder.val())){
			layer.tips("角色排序不能空",$roleOrder.get(0));
			$roleOrder.focus();
			this.disabled="";
			return false;
		}
		*/
		$("form").submit();
	});
});
function isEmpty(val){
	return (null==val || ""==val.replace("\\s",""));
}